import React from 'react';
import ReactDOM from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import 'shared/styles/index.less';
import Example from './Example';

const render = (Component) => {
  ReactDOM.render(
    <AppContainer>
      <Component />
    </AppContainer>,
    document.getElementById('app-root')
  );
};

render(Example);

// Hot Module Replacement api
if (module.hot) {
  module.hot.accept('./Example', () => render(Example));
}
